package com.lib.krismile.entity;/*
 * @author ： zwh
 * @date : 2021/4/1
 * @description ：
 */

import android.widget.TextView;

import androidx.core.content.ContextCompat;
import androidx.databinding.BindingAdapter;

import com.blankj.utilcode.util.ResourceUtils;
import com.lib.krismile.R;

public class PopupTxtItemEntity {
    /**
     * 标题
     */
    private String title;

    /**
     * 是否选中当前条目
     */
    private boolean checked;

    public PopupTxtItemEntity(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    @BindingAdapter("bindPopupTextColor")
    public static void setPopTxtColor(TextView textView,boolean isChecked){
        textView.setTextColor(ContextCompat.getColor(textView.getContext(),isChecked ? R.color.color_red : R.color.color_gray_1));
    }
}
